package com.qys.livesMall.app.user.service;

import com.qys.livesMall.app.user.model.dto.sys.AppUserGoldAccountDTO;
import com.qys.livesMall.app.user.model.entity.AppUserGoldAccount;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qys.livesMall.app.user.model.entity.H2AppUser;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 用户金币账户表 服务类
 * </p>
 *
 * @author wzy
 * @since 2023-06-24
 */
public interface AppUserGoldAccountService extends IService<AppUserGoldAccount> {

    BigDecimal exchangeGoldRatio();

    void addAccounts(List<H2AppUser> users);

    AppUserGoldAccount getGoldAccountByUserId(Long userId);

    /**赠送直播礼物*/
    boolean giveLivesGift(Long userId, BigDecimal goldAmount);

    /**余额兑换金币*/
    boolean balanceExchangeGold(Long userId, BigDecimal goldAmount);


    boolean editBatch(AppUserGoldAccountDTO dto);
}
